package one;

import java.util.Arrays;

//构造方法
public class Gouzao {
    public static void main(String[] args) {
        Myclass t1 = new Myclass(10);
        Myclass t2 = new Myclass(20);
        Myclass t3 = new Myclass(10,20);
        System.out.println(t1.a + t2.a);

        String[] arr = new String[10];
        Arrays.fill(arr,"sss");
        for (String elsmnt:arr){
            System.out.println(elsmnt);
        }

        int[] a = new int[]{1,2,3};
        int[] c = new int[]{1,2,3};
        int[] b = new int[]{2,3,4};
        System.out.println(Arrays.equals(a,b));
        System.out.println(Arrays.equals(a,c));
    }

static class Myclass{  //创建一个类;
        int a;  //类的属性;
        Myclass(int x){   //创建方法;
            System.out.println(a);
            a=x;

        }
        Myclass(int x,int y){  //使用方法重载创建一个新方法;
            System.out.println(x+y);
        }

}

}
